<!--
 * @Description: 
 * @Author: xuzp4
 * @Date: 2021-11-04 13:26:10
 * @LastEditors: xuzp4
 * @LastEditTime: 2022-06-09 17:36:53
 * @FilePath: \vue_demo\src\view\video\index.vue
-->
<template>
  <video id="videoElement" controls></video>
</template>

<script>
import flvjs from "flv.js";
export default {
  mounted() {
    if (flvjs.isSupported()) {
      var videoElement = document.getElementById("videoElement");
      var flvPlayer = flvjs.createPlayer({
        type: "flv",
        url: 'http://cyberplayer.bcelive.com/videoworks/mda-kbuhu4wqdi08dwix/cyberplayer/flv/cyberplayer-demo.flv',
        // url: "https://liveoss.com:4023/flv?port=10077&app=live&stream=13952205346_channel_1",
        // isLive: true,
      });
      flvPlayer.attachMediaElement(videoElement);
      flvPlayer.load();
      flvPlayer.play();
    }
  },
};
</script>

<style>
#videoElement {
    width:560px;
    height:400px;
}
</style>